package charazay.tool.managers.site;

public class GenericSiteManager {
	
	/**API request to Charazay*/
	protected static final String URL = "http://www.charazay.com/xml.php";

	protected static final int PLAYERS_LIST = 0;

	protected static final int MATCH_INFO = 1;

	protected static final int TEAM_SCHEDULE = 2;

	protected static final int TEAM_INFORMATION = 3;

	protected static final int DIVISION_INFORMATION = 4;

	protected static final int COUNTRY_INFORMATION = 5;

	protected static final int PLAYER_INFORMATION = 6;

	protected static final int DIVISION_SCHEDULE = 7;

	protected static final int TRANSFER_HISTORY = 8;

	protected static final int USER_INFORMATION = 9;

	protected static final int ARENA_INFORMATION = 10;

	protected static final int COACHES_INFORMATION = 11;

	protected static final int ECONOMY_INFORMATION = 12;
	
	public GenericSiteManager() {
	}
	
	public String buildURL(String username, String password, String code, String id) {
		String request_url = new String();
		if (id == null && code == null) {
			request_url = URL+"?username="+username+"&password="+password;
		}
		else if (id == null) {
			request_url = URL+"?username="+username+"&password="+password+"&code="+code;
		}
		else {
			request_url = URL+"?username="+username+"&password="+password+"&code="+code+"&id="+id;
		}
		return request_url;
	}
}
